package yth.api.user.jobhandler;


import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import yth.api.user.dao.LogisticsUserMapper;
import yth.api.user.entity.LogisticsUser;

@JobHandler(value="logisticsJobHandler")
@Component
public class LogisticsJobHandler extends IJobHandler {

    @Autowired
    private LogisticsUserMapper logisticsUserMapper;

    @Override
    public ReturnT<String> execute(String s) throws Exception {

        LogisticsUser logisticsUser = logisticsUserMapper.selectByPrimaryKey("11122223333");
        System.out.println(logisticsUser.getAccount()+":"+logisticsUser.getUsername());

        return SUCCESS;
    }
}
